import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as Icons from "@element-plus/icons-vue";
// pinia store
import pinia from "@/stores";
import { userManager } from "./config/oidc";

const app = createApp(App);

// 全局注册 userManager
app.config.globalProperties.$userManager = userManager;

Object.keys(Icons).forEach((key) => {
  app.component(key, Icons[key]);
});

app.use(router);
app.use(ElementPlus);
app.use(pinia);
app.mount("#app");
